<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>DateUtils (Apache Commons Lang 3.3.2 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="DateUtils (Apache Commons Lang 3.3.2 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/lang3/time/DatePrinter.html" title="interface in org.apache.commons.lang3.time"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/lang3/time/DurationFormatUtils.html" title="class in org.apache.commons.lang3.time"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/lang3/time/DateUtils.html" target="_top">Frames</a></li>
<li><a href="DateUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.lang3.time</div>
<h2 title="Class DateUtils" class="title">Class DateUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.lang3.time.DateUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">DateUtils</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><p>A suite of utilities surrounding the use of the
 <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util"><code>Calendar</code></a> and <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a> object.</p>
 
 <p>DateUtils contains a lot of common methods considering manipulations
 of Dates or Calendars. Some methods require some extra explanation.
 The truncate, ceiling and round methods could be considered the Math.floor(),
 Math.ceil() or Math.round versions for dates
 This way date-fields will be ignored in bottom-up order.
 As a complement to these methods we've introduced some fragment-methods.
 With these methods the Date-fields will be ignored in top-down order.
 Since a date without a year is not a valid date, you have to decide in what
 kind of date-field you want your result, for instance milliseconds or days.
 </p></div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.0</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: DateUtils.java 1583482 2014-03-31 22:54:57Z niallp $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#MILLIS_PER_DAY">MILLIS_PER_DAY</a></strong></code>
<div class="block">Number of milliseconds in a standard day.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#MILLIS_PER_HOUR">MILLIS_PER_HOUR</a></strong></code>
<div class="block">Number of milliseconds in a standard hour.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#MILLIS_PER_MINUTE">MILLIS_PER_MINUTE</a></strong></code>
<div class="block">Number of milliseconds in a standard minute.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#MILLIS_PER_SECOND">MILLIS_PER_SECOND</a></strong></code>
<div class="block">Number of milliseconds in a standard second.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_MONTH_MONDAY">RANGE_MONTH_MONDAY</a></strong></code>
<div class="block">A month range, the week starting on Monday.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_MONTH_SUNDAY">RANGE_MONTH_SUNDAY</a></strong></code>
<div class="block">A month range, the week starting on Sunday.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_CENTER">RANGE_WEEK_CENTER</a></strong></code>
<div class="block">A week range, centered around the day focused.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_MONDAY">RANGE_WEEK_MONDAY</a></strong></code>
<div class="block">A week range, starting on Monday.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_RELATIVE">RANGE_WEEK_RELATIVE</a></strong></code>
<div class="block">A week range, starting on the day focused.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_SUNDAY">RANGE_WEEK_SUNDAY</a></strong></code>
<div class="block">A week range, starting on Sunday.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#SEMI_MONTH">SEMI_MONTH</a></strong></code>
<div class="block">This is half a month, so this represents whether a date is in the top
 or bottom half of the month.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#DateUtils()">DateUtils</a></strong>()</code>
<div class="block"><code>DateUtils</code> instances should NOT be constructed in
 standard programming.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addDays(java.util.Date, int)">addDays</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
       int&nbsp;amount)</code>
<div class="block">Adds a number of days to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addHours(java.util.Date, int)">addHours</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
        int&nbsp;amount)</code>
<div class="block">Adds a number of hours to a date returning a new object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addMilliseconds(java.util.Date, int)">addMilliseconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
               int&nbsp;amount)</code>
<div class="block">Adds a number of milliseconds to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addMinutes(java.util.Date, int)">addMinutes</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
          int&nbsp;amount)</code>
<div class="block">Adds a number of minutes to a date returning a new object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addMonths(java.util.Date, int)">addMonths</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
         int&nbsp;amount)</code>
<div class="block">Adds a number of months to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addSeconds(java.util.Date, int)">addSeconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
          int&nbsp;amount)</code>
<div class="block">Adds a number of seconds to a date returning a new object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addWeeks(java.util.Date, int)">addWeeks</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
        int&nbsp;amount)</code>
<div class="block">Adds a number of weeks to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#addYears(java.util.Date, int)">addYears</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
        int&nbsp;amount)</code>
<div class="block">Adds a number of years to a date returning a new object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#ceiling(java.util.Calendar, int)">ceiling</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;date,
       int&nbsp;field)</code>
<div class="block">Gets a date ceiling, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#ceiling(java.util.Date, int)">ceiling</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
       int&nbsp;field)</code>
<div class="block">Gets a date ceiling, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#ceiling(java.lang.Object, int)">ceiling</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;date,
       int&nbsp;field)</code>
<div class="block">Gets a date ceiling, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInDays(java.util.Calendar, int)">getFragmentInDays</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                 int&nbsp;fragment)</code>
<div class="block">Returns the number of days within the 
 fragment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInDays(java.util.Date, int)">getFragmentInDays</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                 int&nbsp;fragment)</code>
<div class="block">Returns the number of days within the 
 fragment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInHours(java.util.Calendar, int)">getFragmentInHours</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                  int&nbsp;fragment)</code>
<div class="block">Returns the number of hours within the 
 fragment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInHours(java.util.Date, int)">getFragmentInHours</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                  int&nbsp;fragment)</code>
<div class="block">Returns the number of hours within the 
 fragment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInMilliseconds(java.util.Calendar, int)">getFragmentInMilliseconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                         int&nbsp;fragment)</code>
<div class="block">Returns the number of milliseconds within the 
 fragment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInMilliseconds(java.util.Date, int)">getFragmentInMilliseconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                         int&nbsp;fragment)</code>
<div class="block">Returns the number of milliseconds within the 
 fragment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInMinutes(java.util.Calendar, int)">getFragmentInMinutes</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                    int&nbsp;fragment)</code>
<div class="block">Returns the number of minutes within the 
 fragment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInMinutes(java.util.Date, int)">getFragmentInMinutes</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                    int&nbsp;fragment)</code>
<div class="block">Returns the number of minutes within the 
 fragment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInSeconds(java.util.Calendar, int)">getFragmentInSeconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                    int&nbsp;fragment)</code>
<div class="block">Returns the number of seconds within the 
 fragment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#getFragmentInSeconds(java.util.Date, int)">getFragmentInSeconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                    int&nbsp;fragment)</code>
<div class="block">Returns the number of seconds within the 
 fragment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#isSameDay(java.util.Calendar, java.util.Calendar)">isSameDay</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
         <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2)</code>
<div class="block">Checks if two calendar objects are on the same day ignoring time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#isSameDay(java.util.Date, java.util.Date)">isSameDay</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
         <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2)</code>
<div class="block">Checks if two date objects are on the same day ignoring time.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#isSameInstant(java.util.Calendar, java.util.Calendar)">isSameInstant</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
             <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2)</code>
<div class="block">Checks if two calendar objects represent the same instant in time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#isSameInstant(java.util.Date, java.util.Date)">isSameInstant</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
             <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2)</code>
<div class="block">Checks if two date objects represent the same instant in time.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#isSameLocalTime(java.util.Calendar, java.util.Calendar)">isSameLocalTime</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
               <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2)</code>
<div class="block">Checks if two calendar objects represent the same local time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#iterator(java.util.Calendar, int)">iterator</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;focus,
        int&nbsp;rangeStyle)</code>
<div class="block">Constructs an <code>Iterator</code> over each day in a date
 range defined by a focus date and range style.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#iterator(java.util.Date, int)">iterator</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;focus,
        int&nbsp;rangeStyle)</code>
<div class="block">Constructs an <code>Iterator</code> over each day in a date
 range defined by a focus date and range style.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;?&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#iterator(java.lang.Object, int)">iterator</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;focus,
        int&nbsp;rangeStyle)</code>
<div class="block">Constructs an <code>Iterator</code> over each day in a date
 range defined by a focus date and range style.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#parseDate(java.lang.String, java.util.Locale, java.lang.String...)">parseDate</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
         <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale,
         <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)</code>
<div class="block">Parses a string representing a date by trying a variety of different parsers,
 using the default date format symbols for the given locale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#parseDate(java.lang.String, java.lang.String...)">parseDate</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
         <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)</code>
<div class="block">Parses a string representing a date by trying a variety of different parsers.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#parseDateStrictly(java.lang.String, java.util.Locale, java.lang.String...)">parseDateStrictly</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
                 <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale,
                 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)</code>
<div class="block">Parses a string representing a date by trying a variety of different parsers,
 using the default date format symbols for the given locale..</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#parseDateStrictly(java.lang.String, java.lang.String...)">parseDateStrictly</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
                 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)</code>
<div class="block">Parses a string representing a date by trying a variety of different parsers.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#round(java.util.Calendar, int)">round</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;date,
     int&nbsp;field)</code>
<div class="block">Rounds a date, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#round(java.util.Date, int)">round</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
     int&nbsp;field)</code>
<div class="block">Rounds a date, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#round(java.lang.Object, int)">round</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;date,
     int&nbsp;field)</code>
<div class="block">Rounds a date, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#setDays(java.util.Date, int)">setDays</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
       int&nbsp;amount)</code>
<div class="block">Sets the day of month field to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#setHours(java.util.Date, int)">setHours</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
        int&nbsp;amount)</code>
<div class="block">Sets the hours field to a date returning a new object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#setMilliseconds(java.util.Date, int)">setMilliseconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
               int&nbsp;amount)</code>
<div class="block">Sets the miliseconds field to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#setMinutes(java.util.Date, int)">setMinutes</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
          int&nbsp;amount)</code>
<div class="block">Sets the minute field to a date returning a new object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#setMonths(java.util.Date, int)">setMonths</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
         int&nbsp;amount)</code>
<div class="block">Sets the months field to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#setSeconds(java.util.Date, int)">setSeconds</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
          int&nbsp;amount)</code>
<div class="block">Sets the seconds field to a date returning a new object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#setYears(java.util.Date, int)">setYears</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
        int&nbsp;amount)</code>
<div class="block">Sets the years field to a date returning a new object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#toCalendar(java.util.Date)">toCalendar</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</code>
<div class="block">Converts a <code>Date</code> into a <code>Calendar</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncate(java.util.Calendar, int)">truncate</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;date,
        int&nbsp;field)</code>
<div class="block">Truncates a date, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncate(java.util.Date, int)">truncate</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
        int&nbsp;field)</code>
<div class="block">Truncates a date, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncate(java.lang.Object, int)">truncate</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;date,
        int&nbsp;field)</code>
<div class="block">Truncates a date, leaving the field specified as the most
 significant field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedCompareTo(java.util.Calendar, java.util.Calendar, int)">truncatedCompareTo</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
                  <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2,
                  int&nbsp;field)</code>
<div class="block">Determines how two calendars compare up to no more than the specified 
 most significant field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedCompareTo(java.util.Date, java.util.Date, int)">truncatedCompareTo</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
                  <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2,
                  int&nbsp;field)</code>
<div class="block">Determines how two dates compare up to no more than the specified 
 most significant field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedEquals(java.util.Calendar, java.util.Calendar, int)">truncatedEquals</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
               <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2,
               int&nbsp;field)</code>
<div class="block">Determines if two calendars are equal up to no more than the specified 
 most significant field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedEquals(java.util.Date, java.util.Date, int)">truncatedEquals</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
               <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2,
               int&nbsp;field)</code>
<div class="block">Determines if two dates are equal up to no more than the specified 
 most significant field.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="MILLIS_PER_SECOND">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_SECOND</h4>
<pre>public static final&nbsp;long MILLIS_PER_SECOND</pre>
<div class="block">Number of milliseconds in a standard second.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.MILLIS_PER_SECOND">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MILLIS_PER_MINUTE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_MINUTE</h4>
<pre>public static final&nbsp;long MILLIS_PER_MINUTE</pre>
<div class="block">Number of milliseconds in a standard minute.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.MILLIS_PER_MINUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MILLIS_PER_HOUR">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_HOUR</h4>
<pre>public static final&nbsp;long MILLIS_PER_HOUR</pre>
<div class="block">Number of milliseconds in a standard hour.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.MILLIS_PER_HOUR">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MILLIS_PER_DAY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_DAY</h4>
<pre>public static final&nbsp;long MILLIS_PER_DAY</pre>
<div class="block">Number of milliseconds in a standard day.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.MILLIS_PER_DAY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SEMI_MONTH">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SEMI_MONTH</h4>
<pre>public static final&nbsp;int SEMI_MONTH</pre>
<div class="block">This is half a month, so this represents whether a date is in the top
 or bottom half of the month.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.SEMI_MONTH">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="RANGE_WEEK_SUNDAY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RANGE_WEEK_SUNDAY</h4>
<pre>public static final&nbsp;int RANGE_WEEK_SUNDAY</pre>
<div class="block">A week range, starting on Sunday.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.RANGE_WEEK_SUNDAY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="RANGE_WEEK_MONDAY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RANGE_WEEK_MONDAY</h4>
<pre>public static final&nbsp;int RANGE_WEEK_MONDAY</pre>
<div class="block">A week range, starting on Monday.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.RANGE_WEEK_MONDAY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="RANGE_WEEK_RELATIVE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RANGE_WEEK_RELATIVE</h4>
<pre>public static final&nbsp;int RANGE_WEEK_RELATIVE</pre>
<div class="block">A week range, starting on the day focused.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.RANGE_WEEK_RELATIVE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="RANGE_WEEK_CENTER">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RANGE_WEEK_CENTER</h4>
<pre>public static final&nbsp;int RANGE_WEEK_CENTER</pre>
<div class="block">A week range, centered around the day focused.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.RANGE_WEEK_CENTER">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="RANGE_MONTH_SUNDAY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RANGE_MONTH_SUNDAY</h4>
<pre>public static final&nbsp;int RANGE_MONTH_SUNDAY</pre>
<div class="block">A month range, the week starting on Sunday.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.RANGE_MONTH_SUNDAY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="RANGE_MONTH_MONDAY">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>RANGE_MONTH_MONDAY</h4>
<pre>public static final&nbsp;int RANGE_MONTH_MONDAY</pre>
<div class="block">A month range, the week starting on Monday.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.lang3.time.DateUtils.RANGE_MONTH_MONDAY">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="DateUtils()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DateUtils</h4>
<pre>public&nbsp;DateUtils()</pre>
<div class="block"><p><code>DateUtils</code> instances should NOT be constructed in
 standard programming. Instead, the static methods on the class should
 be used, such as <code>DateUtils.parseDate(str);</code>.</p>

 <p>This constructor is public to permit tools that require a JavaBean
 instance to operate.</p></div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="isSameDay(java.util.Date, java.util.Date)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameDay</h4>
<pre>public static&nbsp;boolean&nbsp;isSameDay(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
                <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2)</pre>
<div class="block"><p>Checks if two date objects are on the same day ignoring time.</p>

 <p>28 Mar 2002 13:45 and 28 Mar 2002 06:01 would return true.
 28 Mar 2002 13:45 and 12 Mar 2002 13:45 would return false.
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date1</code> - the first date, not altered, not null</dd><dd><code>date2</code> - the second date, not altered, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if they represent the same day</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either date is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="isSameDay(java.util.Calendar, java.util.Calendar)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameDay</h4>
<pre>public static&nbsp;boolean&nbsp;isSameDay(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
                <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2)</pre>
<div class="block"><p>Checks if two calendar objects are on the same day ignoring time.</p>

 <p>28 Mar 2002 13:45 and 28 Mar 2002 06:01 would return true.
 28 Mar 2002 13:45 and 12 Mar 2002 13:45 would return false.
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cal1</code> - the first calendar, not altered, not null</dd><dd><code>cal2</code> - the second calendar, not altered, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if they represent the same day</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either calendar is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="isSameInstant(java.util.Date, java.util.Date)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameInstant</h4>
<pre>public static&nbsp;boolean&nbsp;isSameInstant(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
                    <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2)</pre>
<div class="block"><p>Checks if two date objects represent the same instant in time.</p>

 <p>This method compares the long millisecond time of the two objects.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date1</code> - the first date, not altered, not null</dd><dd><code>date2</code> - the second date, not altered, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if they represent the same millisecond instant</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either date is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="isSameInstant(java.util.Calendar, java.util.Calendar)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameInstant</h4>
<pre>public static&nbsp;boolean&nbsp;isSameInstant(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
                    <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2)</pre>
<div class="block"><p>Checks if two calendar objects represent the same instant in time.</p>

 <p>This method compares the long millisecond time of the two objects.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cal1</code> - the first calendar, not altered, not null</dd><dd><code>cal2</code> - the second calendar, not altered, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if they represent the same millisecond instant</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either date is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="isSameLocalTime(java.util.Calendar, java.util.Calendar)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameLocalTime</h4>
<pre>public static&nbsp;boolean&nbsp;isSameLocalTime(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
                      <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2)</pre>
<div class="block"><p>Checks if two calendar objects represent the same local time.</p>

 <p>This method compares the values of the fields of the two objects.
 In addition, both calendars must be the same of the same type.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cal1</code> - the first calendar, not altered, not null</dd><dd><code>cal2</code> - the second calendar, not altered, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if they represent the same millisecond instant</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either date is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="parseDate(java.lang.String, java.lang.String...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDate</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;parseDate(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
             <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)
                      throws <a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></pre>
<div class="block"><p>Parses a string representing a date by trying a variety of different parsers.</p>
 
 <p>The parse will try each parse pattern in turn.
 A parse is only deemed successful if it parses the whole of the input string.
 If no parse patterns match, a ParseException is thrown.</p>
 The parser will be lenient toward the parsed date.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the date to parse, not null</dd><dd><code>parsePatterns</code> - the date format patterns to use, see SimpleDateFormat, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date string or pattern array is null</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></code> - if none of the date patterns were suitable (or there were none)</dd></dl>
</li>
</ul>
<a name="parseDate(java.lang.String, java.util.Locale, java.lang.String...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDate</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;parseDate(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
             <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale,
             <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)
                      throws <a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></pre>
<div class="block"><p>Parses a string representing a date by trying a variety of different parsers,
 using the default date format symbols for the given locale.</p>
 
 <p>The parse will try each parse pattern in turn.
 A parse is only deemed successful if it parses the whole of the input string.
 If no parse patterns match, a ParseException is thrown.</p>
 The parser will be lenient toward the parsed date.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the date to parse, not null</dd><dd><code>locale</code> - the locale whose date format symbols should be used. If <code>null</code>,
 the system locale is used (as per <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#parseDate(java.lang.String, java.lang.String...)"><code>parseDate(String, String...)</code></a>).</dd><dd><code>parsePatterns</code> - the date format patterns to use, see SimpleDateFormat, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date string or pattern array is null</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></code> - if none of the date patterns were suitable (or there were none)</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.2</dd></dl>
</li>
</ul>
<a name="parseDateStrictly(java.lang.String, java.lang.String...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDateStrictly</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;parseDateStrictly(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)
                              throws <a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></pre>
<div class="block"><p>Parses a string representing a date by trying a variety of different parsers.</p>
 
 <p>The parse will try each parse pattern in turn.
 A parse is only deemed successful if it parses the whole of the input string.
 If no parse patterns match, a ParseException is thrown.</p>
 The parser parses strictly - it does not allow for dates such as "February 942, 1996".</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the date to parse, not null</dd><dd><code>parsePatterns</code> - the date format patterns to use, see SimpleDateFormat, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date string or pattern array is null</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></code> - if none of the date patterns were suitable</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.5</dd></dl>
</li>
</ul>
<a name="parseDateStrictly(java.lang.String, java.util.Locale, java.lang.String...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDateStrictly</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;parseDateStrictly(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;parsePatterns)
                              throws <a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></pre>
<div class="block"><p>Parses a string representing a date by trying a variety of different parsers,
 using the default date format symbols for the given locale..</p>
 
 <p>The parse will try each parse pattern in turn.
 A parse is only deemed successful if it parses the whole of the input string.
 If no parse patterns match, a ParseException is thrown.</p>
 The parser parses strictly - it does not allow for dates such as "February 942, 1996".</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the date to parse, not null</dd><dd><code>locale</code> - the locale whose date format symbols should be used. If <code>null</code>,
 the system locale is used (as per <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#parseDateStrictly(java.lang.String, java.lang.String...)"><code>parseDateStrictly(String, String...)</code></a>).</dd><dd><code>parsePatterns</code> - the date format patterns to use, see SimpleDateFormat, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date string or pattern array is null</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></code> - if none of the date patterns were suitable</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.2</dd></dl>
</li>
</ul>
<a name="addYears(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addYears</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addYears(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
            int&nbsp;amount)</pre>
<div class="block">Adds a number of years to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="addMonths(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMonths</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addMonths(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
             int&nbsp;amount)</pre>
<div class="block">Adds a number of months to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="addWeeks(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addWeeks</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addWeeks(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
            int&nbsp;amount)</pre>
<div class="block">Adds a number of weeks to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="addDays(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addDays</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addDays(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
           int&nbsp;amount)</pre>
<div class="block">Adds a number of days to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="addHours(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addHours</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addHours(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
            int&nbsp;amount)</pre>
<div class="block">Adds a number of hours to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="addMinutes(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMinutes</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addMinutes(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
              int&nbsp;amount)</pre>
<div class="block">Adds a number of minutes to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="addSeconds(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addSeconds</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addSeconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
              int&nbsp;amount)</pre>
<div class="block">Adds a number of seconds to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="addMilliseconds(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMilliseconds</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;addMilliseconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                   int&nbsp;amount)</pre>
<div class="block">Adds a number of milliseconds to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to add, may be negative</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new <code>Date</code> with the amount added</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd></dl>
</li>
</ul>
<a name="setYears(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setYears</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;setYears(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
            int&nbsp;amount)</pre>
<div class="block">Sets the years field to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to set</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new <code>Date</code> set with the specified value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="setMonths(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMonths</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;setMonths(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
             int&nbsp;amount)</pre>
<div class="block">Sets the months field to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to set</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new <code>Date</code> set with the specified value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="setDays(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDays</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;setDays(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
           int&nbsp;amount)</pre>
<div class="block">Sets the day of month field to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to set</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new <code>Date</code> set with the specified value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="setHours(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHours</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;setHours(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
            int&nbsp;amount)</pre>
<div class="block">Sets the hours field to a date returning a new object.  Hours range 
 from  0-23.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to set</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new <code>Date</code> set with the specified value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="setMinutes(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMinutes</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;setMinutes(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
              int&nbsp;amount)</pre>
<div class="block">Sets the minute field to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to set</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new <code>Date</code> set with the specified value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="setSeconds(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSeconds</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;setSeconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
              int&nbsp;amount)</pre>
<div class="block">Sets the seconds field to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to set</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new <code>Date</code> set with the specified value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="setMilliseconds(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMilliseconds</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;setMilliseconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                   int&nbsp;amount)</pre>
<div class="block">Sets the miliseconds field to a date returning a new object.
 The original <code>Date</code> is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date, not null</dd><dd><code>amount</code> - the amount to set</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new <code>Date</code> set with the specified value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="toCalendar(java.util.Date)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toCalendar</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;toCalendar(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</pre>
<div class="block">Converts a <code>Date</code> into a <code>Calendar</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to convert to a Calendar</dd>
<dt><span class="strong">Returns:</span></dt><dd>the created Calendar</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if null is passed in</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="round(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>round</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;round(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
         int&nbsp;field)</pre>
<div class="block"><p>Rounds a date, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if this was passed with HOUR, it would return
 28 Mar 2002 14:00:00.000. If this was passed with MONTH, it
 would return 1 April 2002 0:00:00.000.</p>
 
 <p>For a date in a timezone that handles the change to daylight
 saving time, rounding to Calendar.HOUR_OF_DAY will behave as follows.
 Suppose daylight saving time begins at 02:00 on March 30. Rounding a 
 date that crosses this time would produce the following values:
 </p>
 <ul>
 <li>March 30, 2003 01:10 rounds to March 30, 2003 01:00</li>
 <li>March 30, 2003 01:40 rounds to March 30, 2003 03:00</li>
 <li>March 30, 2003 02:10 rounds to March 30, 2003 03:00</li>
 <li>March 30, 2003 02:40 rounds to March 30, 2003 04:00</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different rounded date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd></dl>
</li>
</ul>
<a name="round(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>round</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;round(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;date,
             int&nbsp;field)</pre>
<div class="block"><p>Rounds a date, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if this was passed with HOUR, it would return
 28 Mar 2002 14:00:00.000. If this was passed with MONTH, it
 would return 1 April 2002 0:00:00.000.</p>
 
 <p>For a date in a timezone that handles the change to daylight
 saving time, rounding to Calendar.HOUR_OF_DAY will behave as follows.
 Suppose daylight saving time begins at 02:00 on March 30. Rounding a 
 date that crosses this time would produce the following values:
 </p>
 <ul>
 <li>March 30, 2003 01:10 rounds to March 30, 2003 01:00</li>
 <li>March 30, 2003 01:40 rounds to March 30, 2003 03:00</li>
 <li>March 30, 2003 02:10 rounds to March 30, 2003 03:00</li>
 <li>March 30, 2003 02:40 rounds to March 30, 2003 04:00</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different rounded date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd></dl>
</li>
</ul>
<a name="round(java.lang.Object, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>round</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;round(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;date,
         int&nbsp;field)</pre>
<div class="block"><p>Rounds a date, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if this was passed with HOUR, it would return
 28 Mar 2002 14:00:00.000. If this was passed with MONTH, it
 would return 1 April 2002 0:00:00.000.</p>
 
 <p>For a date in a timezone that handles the change to daylight
 saving time, rounding to Calendar.HOUR_OF_DAY will behave as follows.
 Suppose daylight saving time begins at 02:00 on March 30. Rounding a 
 date that crosses this time would produce the following values:
 </p>
 <ul>
 <li>March 30, 2003 01:10 rounds to March 30, 2003 01:00</li>
 <li>March 30, 2003 01:40 rounds to March 30, 2003 03:00</li>
 <li>March 30, 2003 02:10 rounds to March 30, 2003 03:00</li>
 <li>March 30, 2003 02:40 rounds to March 30, 2003 04:00</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, either <code>Date</code> or <code>Calendar</code>, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different rounded date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - if the object type is not a <code>Date</code> or <code>Calendar</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd></dl>
</li>
</ul>
<a name="truncate(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncate</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;truncate(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
            int&nbsp;field)</pre>
<div class="block"><p>Truncates a date, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if you passed with HOUR, it would return 28 Mar
 2002 13:00:00.000.  If this was passed with MONTH, it would
 return 1 Mar 2002 0:00:00.000.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different truncated date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd></dl>
</li>
</ul>
<a name="truncate(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncate</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;truncate(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;date,
                int&nbsp;field)</pre>
<div class="block"><p>Truncates a date, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if you passed with HOUR, it would return 28 Mar
 2002 13:00:00.000.  If this was passed with MONTH, it would
 return 1 Mar 2002 0:00:00.000.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different truncated date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd></dl>
</li>
</ul>
<a name="truncate(java.lang.Object, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncate</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;truncate(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;date,
            int&nbsp;field)</pre>
<div class="block"><p>Truncates a date, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if you passed with HOUR, it would return 28 Mar
 2002 13:00:00.000.  If this was passed with MONTH, it would
 return 1 Mar 2002 0:00:00.000.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, either <code>Date</code> or <code>Calendar</code>, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different truncated date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - if the object type is not a <code>Date</code> or <code>Calendar</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd></dl>
</li>
</ul>
<a name="ceiling(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ceiling</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;ceiling(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
           int&nbsp;field)</pre>
<div class="block"><p>Gets a date ceiling, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if you passed with HOUR, it would return 28 Mar
 2002 14:00:00.000.  If this was passed with MONTH, it would
 return 1 Apr 2002 0:00:00.000.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different ceil date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.5</dd></dl>
</li>
</ul>
<a name="ceiling(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ceiling</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;ceiling(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;date,
               int&nbsp;field)</pre>
<div class="block"><p>Gets a date ceiling, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if you passed with HOUR, it would return 28 Mar
 2002 14:00:00.000.  If this was passed with MONTH, it would
 return 1 Apr 2002 0:00:00.000.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different ceil date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.5</dd></dl>
</li>
</ul>
<a name="ceiling(java.lang.Object, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ceiling</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;ceiling(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;date,
           int&nbsp;field)</pre>
<div class="block"><p>Gets a date ceiling, leaving the field specified as the most
 significant field.</p>

 <p>For example, if you had the date-time of 28 Mar 2002
 13:45:01.231, if you passed with HOUR, it would return 28 Mar
 2002 14:00:00.000.  If this was passed with MONTH, it would
 return 1 Apr 2002 0:00:00.000.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, either <code>Date</code> or <code>Calendar</code>, not null</dd><dd><code>field</code> - the field from <code>Calendar</code> or <code>SEMI_MONTH</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the different ceil date, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - if the object type is not a <code>Date</code> or <code>Calendar</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the year is over 280 million</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.5</dd></dl>
</li>
</ul>
<a name="iterator(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&gt;&nbsp;iterator(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;focus,
                          int&nbsp;rangeStyle)</pre>
<div class="block"><p>Constructs an <code>Iterator</code> over each day in a date
 range defined by a focus date and range style.</p>

 <p>For instance, passing Thursday, July 4, 2002 and a
 <code>RANGE_MONTH_SUNDAY</code> will return an <code>Iterator</code>
 that starts with Sunday, June 30, 2002 and ends with Saturday, August 3,
 2002, returning a Calendar instance for each intermediate day.</p>

 <p>This method provides an iterator that returns Calendar objects.
 The days are progressed using <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true#add(int, int)" title="class or interface in java.util"><code>Calendar.add(int, int)</code></a>.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>focus</code> - the date to work with, not null</dd><dd><code>rangeStyle</code> - the style constant to use. Must be one of
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_MONTH_SUNDAY"><code>RANGE_MONTH_SUNDAY</code></a>, 
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_MONTH_MONDAY"><code>RANGE_MONTH_MONDAY</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_SUNDAY"><code>RANGE_WEEK_SUNDAY</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_MONDAY"><code>RANGE_WEEK_MONDAY</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_RELATIVE"><code>RANGE_WEEK_RELATIVE</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_CENTER"><code>RANGE_WEEK_CENTER</code></a></dd>
<dt><span class="strong">Returns:</span></dt><dd>the date iterator, not null, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the rangeStyle is invalid</dd></dl>
</li>
</ul>
<a name="iterator(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&gt;&nbsp;iterator(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;focus,
                          int&nbsp;rangeStyle)</pre>
<div class="block"><p>Constructs an <code>Iterator</code> over each day in a date
 range defined by a focus date and range style.</p>

 <p>For instance, passing Thursday, July 4, 2002 and a
 <code>RANGE_MONTH_SUNDAY</code> will return an <code>Iterator</code>
 that starts with Sunday, June 30, 2002 and ends with Saturday, August 3,
 2002, returning a Calendar instance for each intermediate day.</p>

 <p>This method provides an iterator that returns Calendar objects.
 The days are progressed using <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true#add(int, int)" title="class or interface in java.util"><code>Calendar.add(int, int)</code></a>.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>focus</code> - the date to work with, not null</dd><dd><code>rangeStyle</code> - the style constant to use. Must be one of
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_MONTH_SUNDAY"><code>RANGE_MONTH_SUNDAY</code></a>, 
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_MONTH_MONDAY"><code>RANGE_MONTH_MONDAY</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_SUNDAY"><code>RANGE_WEEK_SUNDAY</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_MONDAY"><code>RANGE_WEEK_MONDAY</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_RELATIVE"><code>RANGE_WEEK_RELATIVE</code></a>,
 <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#RANGE_WEEK_CENTER"><code>RANGE_WEEK_CENTER</code></a></dd>
<dt><span class="strong">Returns:</span></dt><dd>the date iterator, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the rangeStyle is invalid</dd></dl>
</li>
</ul>
<a name="iterator(java.lang.Object, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;?&gt;&nbsp;iterator(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;focus,
                   int&nbsp;rangeStyle)</pre>
<div class="block"><p>Constructs an <code>Iterator</code> over each day in a date
 range defined by a focus date and range style.</p>

 <p>For instance, passing Thursday, July 4, 2002 and a
 <code>RANGE_MONTH_SUNDAY</code> will return an <code>Iterator</code>
 that starts with Sunday, June 30, 2002 and ends with Saturday, August 3,
 2002, returning a Calendar instance for each intermediate day.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>focus</code> - the date to work with, either <code>Date</code> or <code>Calendar</code>, not null</dd><dd><code>rangeStyle</code> - the style constant to use. Must be one of the range
 styles listed for the <a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#iterator(java.util.Calendar, int)"><code>iterator(Calendar, int)</code></a> method.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the date iterator, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - if the object type is not a <code>Date</code> or <code>Calendar</code></dd></dl>
</li>
</ul>
<a name="getFragmentInMilliseconds(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInMilliseconds</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInMilliseconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                             int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of milliseconds within the 
 fragment. All datefields greater than the fragment will be ignored.</p>
 
 <p>Asking the milliseconds of any date will only return the number of milliseconds
 of the current second (resulting in a number between 0 and 999). This 
 method will retrieve the number of milliseconds for any fragment. 
 For example, if you want to calculate the number of milliseconds past today, 
 your fragment is Calendar.DATE or Calendar.DAY_OF_YEAR. The result will
 be all milliseconds of the past hour(s), minutes(s) and second(s).</p>
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a SECOND field will return 0.</p> 
 
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10538 (10*1000 + 538)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in milliseconds)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of date to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of milliseconds within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInSeconds(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInSeconds</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInSeconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                        int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of seconds within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the seconds of any date will only return the number of seconds
 of the current minute (resulting in a number between 0 and 59). This 
 method will retrieve the number of seconds for any fragment. 
 For example, if you want to calculate the number of seconds past today, 
 your fragment is Calendar.DATE or Calendar.DAY_OF_YEAR. The result will
 be all seconds of the past hour(s) and minutes(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a SECOND field will return 0.</p> 
 
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
   (equivalent to deprecated date.getSeconds())</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
   (equivalent to deprecated date.getSeconds())</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 26110
   (7*3600 + 15*60 + 10)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in seconds)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of date to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of seconds within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInMinutes(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInMinutes</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInMinutes(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                        int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of minutes within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the minutes of any date will only return the number of minutes
 of the current hour (resulting in a number between 0 and 59). This 
 method will retrieve the number of minutes for any fragment. 
 For example, if you want to calculate the number of minutes past this month, 
 your fragment is Calendar.MONTH. The result will be all minutes of the 
 past day(s) and hour(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a MINUTE field will return 0.</p> 
 
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
   (equivalent to deprecated date.getMinutes())</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
   (equivalent to deprecated date.getMinutes())</li>
  <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 15</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 435 (7*60 + 15)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in minutes)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of date to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of minutes within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInHours(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInHours</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInHours(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                      int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of hours within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the hours of any date will only return the number of hours
 of the current day (resulting in a number between 0 and 23). This 
 method will retrieve the number of hours for any fragment. 
 For example, if you want to calculate the number of hours past this month, 
 your fragment is Calendar.MONTH. The result will be all hours of the 
 past day(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a HOUR field will return 0.</p> 
 
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
   (equivalent to deprecated date.getHours())</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
   (equivalent to deprecated date.getHours())</li>
  <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 7</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 127 (5*24 + 7)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in hours)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of date to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of hours within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInDays(java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInDays</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInDays(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
                     int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of days within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the days of any date will only return the number of days
 of the current month (resulting in a number between 1 and 31). This 
 method will retrieve the number of days for any fragment. 
 For example, if you want to calculate the number of days past this year, 
 your fragment is Calendar.YEAR. The result will be all days of the 
 past month(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a DAY field will return 0.</p> 
  
 <ul>
  <li>January 28, 2008 with Calendar.MONTH as fragment will return 28
   (equivalent to deprecated date.getDay())</li>
  <li>February 28, 2008 with Calendar.MONTH as fragment will return 28
   (equivalent to deprecated date.getDay())</li>
  <li>January 28, 2008 with Calendar.YEAR as fragment will return 28</li>
  <li>February 28, 2008 with Calendar.YEAR as fragment will return 59</li>
  <li>January 28, 2008 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in days)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of date to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of days  within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInMilliseconds(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInMilliseconds</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInMilliseconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                             int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of milliseconds within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the milliseconds of any date will only return the number of milliseconds
 of the current second (resulting in a number between 0 and 999). This 
 method will retrieve the number of milliseconds for any fragment. 
 For example, if you want to calculate the number of seconds past today, 
 your fragment is Calendar.DATE or Calendar.DAY_OF_YEAR. The result will
 be all seconds of the past hour(s), minutes(s) and second(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a MILLISECOND field will return 0.</p> 
 
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538
   (equivalent to calendar.get(Calendar.MILLISECOND))</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538
   (equivalent to calendar.get(Calendar.MILLISECOND))</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10538
   (10*1000 + 538)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in milliseconds)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>calendar</code> - the calendar to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of calendar to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of milliseconds within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInSeconds(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInSeconds</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInSeconds(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                        int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of seconds within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the seconds of any date will only return the number of seconds
 of the current minute (resulting in a number between 0 and 59). This 
 method will retrieve the number of seconds for any fragment. 
 For example, if you want to calculate the number of seconds past today, 
 your fragment is Calendar.DATE or Calendar.DAY_OF_YEAR. The result will
 be all seconds of the past hour(s) and minutes(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a SECOND field will return 0.</p> 
 
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
   (equivalent to calendar.get(Calendar.SECOND))</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
   (equivalent to calendar.get(Calendar.SECOND))</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 26110
   (7*3600 + 15*60 + 10)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in seconds)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>calendar</code> - the calendar to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of calendar to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of seconds within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInMinutes(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInMinutes</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInMinutes(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                        int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of minutes within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the minutes of any date will only return the number of minutes
 of the current hour (resulting in a number between 0 and 59). This 
 method will retrieve the number of minutes for any fragment. 
 For example, if you want to calculate the number of minutes past this month, 
 your fragment is Calendar.MONTH. The result will be all minutes of the 
 past day(s) and hour(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a MINUTE field will return 0.</p> 
 
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
   (equivalent to calendar.get(Calendar.MINUTES))</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
   (equivalent to calendar.get(Calendar.MINUTES))</li>
  <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 15</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 435 (7*60 + 15)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in minutes)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>calendar</code> - the calendar to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of calendar to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of minutes within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInHours(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInHours</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInHours(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                      int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of hours within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the hours of any date will only return the number of hours
 of the current day (resulting in a number between 0 and 23). This 
 method will retrieve the number of hours for any fragment. 
 For example, if you want to calculate the number of hours past this month, 
 your fragment is Calendar.MONTH. The result will be all hours of the 
 past day(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a HOUR field will return 0.</p> 
  
 <ul>
  <li>January 1, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
   (equivalent to calendar.get(Calendar.HOUR_OF_DAY))</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
   (equivalent to calendar.get(Calendar.HOUR_OF_DAY))</li>
  <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 7</li>
  <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 127 (5*24 + 7)</li>
  <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in hours)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>calendar</code> - the calendar to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of calendar to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of hours within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="getFragmentInDays(java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFragmentInDays</h4>
<pre>public static&nbsp;long&nbsp;getFragmentInDays(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;calendar,
                     int&nbsp;fragment)</pre>
<div class="block"><p>Returns the number of days within the 
 fragment. All datefields greater than the fragment will be ignored.</p> 
 
 <p>Asking the days of any date will only return the number of days
 of the current month (resulting in a number between 1 and 31). This 
 method will retrieve the number of days for any fragment. 
 For example, if you want to calculate the number of days past this year, 
 your fragment is Calendar.YEAR. The result will be all days of the 
 past month(s).</p> 
 
 <p>Valid fragments are: Calendar.YEAR, Calendar.MONTH, both 
 Calendar.DAY_OF_YEAR and Calendar.DATE, Calendar.HOUR_OF_DAY, 
 Calendar.MINUTE, Calendar.SECOND and Calendar.MILLISECOND
 A fragment less than or equal to a DAY field will return 0.</p> 
 
 <ul>
  <li>January 28, 2008 with Calendar.MONTH as fragment will return 28
   (equivalent to calendar.get(Calendar.DAY_OF_MONTH))</li>
  <li>February 28, 2008 with Calendar.MONTH as fragment will return 28
   (equivalent to calendar.get(Calendar.DAY_OF_MONTH))</li>
  <li>January 28, 2008 with Calendar.YEAR as fragment will return 28
   (equivalent to calendar.get(Calendar.DAY_OF_YEAR))</li>
  <li>February 28, 2008 with Calendar.YEAR as fragment will return 59
   (equivalent to calendar.get(Calendar.DAY_OF_YEAR))</li>
  <li>January 28, 2008 with Calendar.MILLISECOND as fragment will return 0
   (a millisecond cannot be split in days)</li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>calendar</code> - the calendar to work with, not null</dd><dd><code>fragment</code> - the <code>Calendar</code> field part of calendar to calculate</dd>
<dt><span class="strong">Returns:</span></dt><dd>number of days within the fragment of date</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is <code>null</code> or 
 fragment is not supported</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.4</dd></dl>
</li>
</ul>
<a name="truncatedEquals(java.util.Calendar, java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncatedEquals</h4>
<pre>public static&nbsp;boolean&nbsp;truncatedEquals(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
                      <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2,
                      int&nbsp;field)</pre>
<div class="block">Determines if two calendars are equal up to no more than the specified 
 most significant field.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cal1</code> - the first calendar, not <code>null</code></dd><dd><code>cal2</code> - the second calendar, not <code>null</code></dd><dd><code>field</code> - the field from <code>Calendar</code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if equal; otherwise <code>false</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any argument is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncate(java.util.Calendar, int)"><code>truncate(Calendar, int)</code></a>, 
<a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedEquals(java.util.Date, java.util.Date, int)"><code>truncatedEquals(Date, Date, int)</code></a></dd></dl>
</li>
</ul>
<a name="truncatedEquals(java.util.Date, java.util.Date, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncatedEquals</h4>
<pre>public static&nbsp;boolean&nbsp;truncatedEquals(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
                      <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2,
                      int&nbsp;field)</pre>
<div class="block">Determines if two dates are equal up to no more than the specified 
 most significant field.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date1</code> - the first date, not <code>null</code></dd><dd><code>date2</code> - the second date, not <code>null</code></dd><dd><code>field</code> - the field from <code>Calendar</code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if equal; otherwise <code>false</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any argument is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncate(java.util.Date, int)"><code>truncate(Date, int)</code></a>, 
<a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedEquals(java.util.Calendar, java.util.Calendar, int)"><code>truncatedEquals(Calendar, Calendar, int)</code></a></dd></dl>
</li>
</ul>
<a name="truncatedCompareTo(java.util.Calendar, java.util.Calendar, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncatedCompareTo</h4>
<pre>public static&nbsp;int&nbsp;truncatedCompareTo(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal1,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util">Calendar</a>&nbsp;cal2,
                     int&nbsp;field)</pre>
<div class="block">Determines how two calendars compare up to no more than the specified 
 most significant field.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cal1</code> - the first calendar, not <code>null</code></dd><dd><code>cal2</code> - the second calendar, not <code>null</code></dd><dd><code>field</code> - the field from <code>Calendar</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a negative integer, zero, or a positive integer as the first 
 calendar is less than, equal to, or greater than the second.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any argument is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncate(java.util.Calendar, int)"><code>truncate(Calendar, int)</code></a>, 
<a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedCompareTo(java.util.Date, java.util.Date, int)"><code>truncatedCompareTo(Date, Date, int)</code></a></dd></dl>
</li>
</ul>
<a name="truncatedCompareTo(java.util.Date, java.util.Date, int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>truncatedCompareTo</h4>
<pre>public static&nbsp;int&nbsp;truncatedCompareTo(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date1,
                     <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date2,
                     int&nbsp;field)</pre>
<div class="block">Determines how two dates compare up to no more than the specified 
 most significant field.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date1</code> - the first date, not <code>null</code></dd><dd><code>date2</code> - the second date, not <code>null</code></dd><dd><code>field</code> - the field from <code>Calendar</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a negative integer, zero, or a positive integer as the first 
 date is less than, equal to, or greater than the second.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any argument is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncate(java.util.Calendar, int)"><code>truncate(Calendar, int)</code></a>, 
<a href="../../../../../org/apache/commons/lang3/time/DateUtils.html#truncatedCompareTo(java.util.Date, java.util.Date, int)"><code>truncatedCompareTo(Date, Date, int)</code></a></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/lang3/time/DatePrinter.html" title="interface in org.apache.commons.lang3.time"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/lang3/time/DurationFormatUtils.html" title="class in org.apache.commons.lang3.time"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/lang3/time/DateUtils.html" target="_top">Frames</a></li>
<li><a href="DateUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
